package cn.lyjuan.first.netty._4_netty_serialize.msg.reader.impl;

import io.netty.buffer.ByteBuf;

public class InvalidReaderImpl extends AbstractReader
{
    @Override
    public String head()
    {
        throw new RuntimeException(this.getClass().getSimpleName() + " cannot be reader");
    }

    @Override
    public int dataLength()
    {
        return 0;
    }

    @Override
    public String read(ByteBuf buf)
    {
        return readToFoot(buf);
    }
}
